package com.mcx.modules.data.localdata.create;

import com.mcx.modules.data.GameDataTableParser;
import com.mcx.modules.data.base.AbstractDBModel;

/** ShopCategory数据管理 */
public class ShopCategoryDBModel extends AbstractDBModel<ShopCategoryDBModel, ShopCategoryEntity>
{
    private static ShopCategoryDBModel instance;

    public static ShopCategoryDBModel getInstance() {
        if (instance == null) {
            instance = new ShopCategoryDBModel();
        }
        return instance;
    }

    /** 文件名称 */
    @Override
    protected String FileName() {
        return "ShopCategory.data";
    }

    /** 创建实体 */
    @Override
    protected ShopCategoryEntity MakeEntity(GameDataTableParser parse)
    {
        ShopCategoryEntity entity = new ShopCategoryEntity();
        entity.Id = parse.GetFieldValueToInt("Id");
        entity.Name = parse.GetFieldValueToUTF8String("Name");
        return entity;
    }
}
